package com.xja.service.impl;

import com.xja.mapper.AdminMapper;
import com.xja.pojo.Admin;
import com.xja.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;

    @Override
    public Admin selectAdminByLoginName(String loginName) {
        //System.out.println("1111111111");
        return this.adminMapper.selectAdminByLoginName(loginName);
    }

    @Override
    public List<String> selectAdminPermissionById(Integer id) {
        //System.out.println("22222222222");
        return this.adminMapper.selectAdminPermissionById(id);
    }

    @Override
    public void updateAdmin(Admin loginPOJO) {
        this.adminMapper.updateByPrimaryKey(loginPOJO);
    }
}
